<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<?php $calendrier = $form->getObject() ?>
<form action="<?php echo url_for('calendrier/'.($calendrier->isNew() ? 'create' : 'update?cal_id='.$calendrier->getCalId())) ?>" method="post">
<?php if (!$calendrier->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>

<?php echo $form->renderHiddenFields(false) ?>
<?php echo $form->renderGlobalErrors() ?>


<table class="detail">
	<tbody>
		<?php echo $form['cal_date']->renderRow(array('size' => 10)) ?>
		<?php echo $form['cal_heure_debut']->renderRow() ?>
		<?php echo $form['cal_heure_fin']->renderRow() ?>
		<?php echo $form['cal_libelle']->renderRow(array('size' => 100)) ?>
		<?php if (!$calendrier->getPlanning()->isNew()): ?>
		<tr>
			<th>Description planification</th>
			<td><?php echo $calendrier->getPlanning()->getCalplnDescription() ?></td>
		</tr>
		<?php endif; ?>
		<?php echo $form['cal_description']->renderRow(array('cols' => 50)) ?>
		<?php echo $form['cal_alerte']->renderRow() ?>
		
	</tbody>
</table>

<?php //echo link_to('Delete', 'calendrier/delete?cal_id='.$form->getObject()->getCalId(), array('method' => 'delete', 'confirm' => 'Are you sure?')) ?>

<div class="action">
<input type="submit" value="Enregistrer" />
&nbsp;
<?php echo link_to('Retour calendrier', 'calendrier/index', array('class' => 'action')) ?>
</div>

</form>
